﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DDZFriendRoom : MonoBehaviour {

    public GameObject JoinRoomBtn;
    public GameObject CreateRoomBtn;

    private void Awake()
    {
        UIEventListener.Get(JoinRoomBtn).onClick = ButtonClick;
        UIEventListener.Get(CreateRoomBtn).onClick = ButtonClick;

    }
    void ButtonClick(GameObject button)
    {
        if (button.name == "JoinRoomBtn")
        {
            EginUser.Instance.gameType = 3;
            GameObject JoinRoomPanel = NGUITools.AddChild(gameObject, (GameObject)(Resources.Load(PublicPrefabPath.JoinRoomPanel)));
        }
        else if (button.name == "CreateRoomBtn")
        {
            GameObject CreateRoomPanel = NGUITools.AddChild(gameObject, (GameObject)(Resources.Load(GameDDZPrafabPath.DDZCreateRoomPanel)));
        }
    }
}
